<template>
	<div class="padding search-light">
		<pol-table ref="polTableRef2" v-bind="tableOpt" height="600px" cellClassName="cellClass">
			<template #P_IsReadOnly="{row}">
				<span class="text-green2">
					启用
				</span>
			</template>
		</pol-table>

		<div class="margin-top-xl flex justify-end align-center">
			<el-button class="padding-lr-xl text-blue3 solid-blue" size="large" @click="closePopupFun">返回</el-button>
			<div class="margin-left-xxl">
				<el-button type="primary" class="btn-bg-blue btn-box padding-lr-xl" size="large">保存</el-button>
			</div>
		</div>
	</div>
</template>

<script setup>
	import { ref, onMounted } from 'vue';
	const emit = defineEmits(['closePopup']);

	//关闭弹出
	const closePopupFun = () => {
		emit('closePopup')
	}

	//表格配置
	const columns = ref([
		{ label: '服务名称', key: 'ItemCode', align: 'center', sortable: true },
		{ label: '描述', key: 'ItemName', align: 'center', sortable: true },
		{ label: '周期', key: 'ItemValue', align: 'center', sortable: true },
		{ label: '状态', key: 'IsDefault', align: 'center', sortable: true },
		{ label: '后台进程', key: 'P_IsSys', align: 'center', sortable: true },
		{ label: '操作', key: 'P_IsReadOnly', align: 'center', width: '100', slot: true }
	]);

	//表格配置
	const tableOpt = ref({
		border: true, //是否带有纵向边框
		isSelection: true, //支持多选
		columns: columns.value,
		localData: [{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},

			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			}, {
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
			{
				ItemCode: 'CCMSBG PLCDataReader1',
				ItemName: 'PLC Data Exchange.',
				ItemValue: '1000',
				IsDefault: '已停止',
				P_IsSys: 'PlatformData',
			},
		]
	});


	onMounted(() => {

	})
</script>

<style lang="scss" scoped>
	.paramseter-box {
		border: 1px solid #1B3CAB;
		padding: 30px 20px 0 30px;
	}
</style>